package cn.wolfcode.crm.service.imp;

import cn.wolfcode.crm.domain.Client;
import cn.wolfcode.crm.mapper.ChartMapper;
import cn.wolfcode.crm.mapper.SellAnalysisMapper;
import cn.wolfcode.crm.query.ClientChartQueryObject;
import cn.wolfcode.crm.query.ClientQueryObject;
import cn.wolfcode.crm.query.PageResult;
import cn.wolfcode.crm.query.SellAnalysisQueryObject;
import cn.wolfcode.crm.service.IChartService;
import cn.wolfcode.crm.service.ISellAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Service
public class SellAnalysServiceImpl implements ISellAnalysisService {
    @Autowired
    private SellAnalysisMapper Mapper;

    public List<?> selectExportData(SellAnalysisQueryObject qo) {
        return Mapper.selectForExport(qo);
    }

    @Override
    public List<Map<String, Object>> sellAnalysis(SellAnalysisQueryObject qo) {
        /*Integer count = Mapper.selectCount(qo);
        if (count == null) {
            return (List<Map<String, Object>>) new PageResult(0,Collections.EMPTY_LIST);
        }*/
        return Mapper.sellAnalysis(qo);
    }
}
